import webpackConfig from './webpack.config';
import routerConfig from './router.config';

export default {
  treeShaking: true,

  /** 浏览器路由配置 **/
  history: 'browser',

  /** 路由配置 **/
  routes: routerConfig,

  alias: {
    constants: '@/constants/',
    utils: '@/utils/',
    services: '@/services/',
    assets: '@/assets/',
  },
  
  theme: {
    "@primary-color": "#039adf"
  },

  plugins: [
    ['umi-plugin-react', {
      locale: {
        default: 'zh-CN',
        baseNavigator: false, // 为true时，用浏览器自带的navigator.language
        antd: true,  // 启用antd的<LocalProvider />
      },
      antd: true,
      dva: {
        hmr: true,
      },
      dynamicImport: false,
      title: 'CMSClientBackendPC',
      dll: {
        exclude: ['jquery-ui-dist']
      },

      routes: {
        exclude: [
          /models\//,
          /services\//,
          /model\.(t|j)sx?$/,
          /service\.(t|j)sx?$/,
          /components\//,
        ],
      },
    }],
  ],

  /** webpack配置 **/
  chainWebpack: webpackConfig,
}
